using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;

namespace GenericExampleParticleSystem
{
    public sealed class FPS
    {
        static float timeElapsed;
        static float deltaTime;
        static int myFPS;

        public static int GetFPS(GameTime gameTime)
        {
            timeElapsed = (float)gameTime.ElapsedRealTime.TotalSeconds;
            if ((deltaTime += timeElapsed) > 1)
            {
                myFPS = (int)(1 / timeElapsed);
                deltaTime -= 1;
            }

            return myFPS;
        }
    }
}
